﻿@model IList<ROOT.CIMV2.Win32.Process>
@{
    ViewBag.Title = "Index";
}

<h2>Index</h2>

<div onclick="tree_toggle(arguments[0])">
    <div>Tree</div>
    <ul class="Container">
        <li class="Node IsRoot IsLast ExpandClosed">
            <div class="Expand"></div>
            <div class="Content">Root</div>
            <ul class="Container">
                <li class="Node ExpandClosed">
                    <div class="Expand"></div>
                    <div class="Content">Item 1</div>
                    <ul class="Container">
                        <li class="Node ExpandClosed IsLast">
                            <div class="Expand"></div>
                            <div class="Content">Item 1.2</div>
                        </li>
                    </ul>
                </li>
                <li class="Node ExpandLeaf IsLast">
                    <div class="Expand"></div>
                    <div class="Content">Item 2</div>
                </li>
            </ul>
        </li>
    </ul>

</div>


@*@foreach (var pr in Model)
{
    <li>@pr.CommandLine</li>
}*@












@*<div id="id01"></div>

<script>
    var xmlhttp = new XMLHttpRequest();
    var url = "@Url.Action("GetSubCollections", "Collection", null, Request.Url.Scheme, null)";

    xmlhttp.onreadystatechange = function () {
        if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
            var myArr = JSON.parse(xmlhttp.responseText);
            myFunction(myArr);
        }
    }
    xmlhttp.open("GET", url, true);
    xmlhttp.send();

    function myFunction(arr) {
        var out = "";
        var i;
        for (i = 0; i < arr.length; i++) {
            out += '<a href="">' + arr[i].Id +'. ' + arr[i].Name + '</a><br>';
        }
        document.getElementById("id01").innerHTML = out;
    }
</script>*@